// TODO: join-id
export default defineEventHandler(async (_event) => {
  getQuery(_event);
  // const { join_id } = _event.context.params;
  const questions: ExamItemType[] = [
    {
      // TODO: REAL? answer
      type: "radio",
      title: "python 内置方法",
      isTest: true,
      content: "下面哪个方法是python中的内置方法?",
      options: ["__call__", "__bind__", "__rop__", "__view__"],
      eiid: 0,
    },
    {
      type: "checkbox",
      title: "python中的数据类型",
      content: "下面那些python类型是用的是浅拷贝?",
      options: ["元组类型", "字典类型", "列表类型", "字符串类型"],
      isTest: true,
      eiid: 1,
    },
    {
      type: "answer",
      title: "python 编程题",
      content: "请你编写这样一个程序: 输入一个字符串，输出该字符串是否回文。回文是指顺读和倒读都一样的字符串。",
      options: ["print('hello world"],
      isTest: true,
      eiid: 2,
    },
  ]
  const res: ReqPayLoad<ExamType> = {
    data: {
      eid: 1,
      title: "python测试卷1",
      content: "python 测试题",
      expire: 60,
      question_count: 3,
      total_score: 100,
      pass_score: 60,
      has_test: false,
      testpaper_questions: questions,
    },
  };
  return res;
});
